OUTPOST: Print weapon names when keys hit#20
OUTPOST: Print weapon names when keys hit#20hackerb9 wants to merge 3 commits intodplassgit:trunkfrom
Conversation
Other changes: * Prints results (miss, hit) on the same line as targetting. * Shows ellipsis animation before Missed or Hit. * Show "Target Destroyed" on last line instead of erasing previous line. * Use semicolon after print statements to prevent unintended scrolling. * Clear lines using CL$=CHR$(13)+SPACE$(39)+CHR$(13) instead of relying on each print statement to end with the right number of spaces.
dplassgit
left a comment
There was a problem hiding this comment.
Thanks for the PR! I haven't gotten a chance to patch it and play with this version yet.
t100/outpost/OUTPST.DO
Outdated
| 6030 IF A$="C" OR A$="c" THEN GOSUB1000: RETURN | ||
| 6035 IF (A$="S" OR A$="s") AND S>0 THEN ?"SECONDARY BATTERY": A=4: Z=5: GOSUB20: S=S-FA: IF S<0 THEN S=0 | ||
| 6040 IF (A$="T" OR A$="t") AND T>0 THEN ?"TORPEDO": A=9: T=T-1 | ||
| 6060 IF A<3 THEN ?@M1,CL$;"BAD INPUT!";: FORZ=1TO500: NEXT: GOTO6000 |
There was a problem hiding this comment.
?@M1,CL$"BAD INPUT!"
(no semicolon in the middle, no trailing semicolon) is more canonical and follows the pattern in the rest of the file.
Same comment elsewhere (lines 6100, 6240, etc.)
There was a problem hiding this comment.
Sure. Note that the semicolon is not superfluous when printing to the final line of the screen.
t100/outpost/OUTPST.DO
Outdated
| 2999 REM Move ship positions, test for supply ship, test for die | ||
| 3000 ?@M1,"ENEMY FIRING & MOVING | ||
| 3010 ?@M2,SPACE$(39) | ||
| 3000 ?@M1,CL$;"ENEMY FIRING & MOVING"; |
There was a problem hiding this comment.
Since cl$ has two newlines, this may not show up in the right place. How does it look on the machine?
There was a problem hiding this comment.
It has two carriage returns, which puts the cursor to the beginning of the line without advancing to a new line.
| 5330 M%(EY(G), EX(G))=48+G-30*(G=5) | ||
| 5400 RETURN | ||
| 5999 REM Get input and fire weapon | ||
| 6000 ?@M1,"WEAPON (M/S/T/C): |
There was a problem hiding this comment.
The extra spaces after the weapon were to erase whatever might have been left over from "ENEMY FIRING & MOVING". Does it look OK?
They are not necessary in this dialect.
|
Okay, I've removed all the superfluous end quotation marks and interstitial semicolons. Let me know if this works for you. |
Other changes:
CL$=CHR$(13)+SPACE$(39)+CHR$(13)instead of relying on each print statement to end with the right number of spaces.